
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module TileStache.Goodies.VecTiles.geojson</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="TileStache.html"><font color="#ffffff">TileStache</font></a>.<a href="TileStache.Goodies.html"><font color="#ffffff">Goodies</font></a>.<a href="TileStache.Goodies.VecTiles.html"><font color="#ffffff">VecTiles</font></a>.geojson</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="json.html">json</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-ceil"><strong>ceil</strong></a>(...)</dt><dd><tt><a href="#-ceil">ceil</a>(x)<br>
&nbsp;<br>
Return&nbsp;the&nbsp;ceiling&nbsp;of&nbsp;x&nbsp;as&nbsp;a&nbsp;float.<br>
This&nbsp;is&nbsp;the&nbsp;smallest&nbsp;integral&nbsp;value&nbsp;&gt;=&nbsp;x.</tt></dd></dl>
 <dl><dt><a name="-decode"><strong>decode</strong></a>(file)</dt><dd><tt>Decode&nbsp;a&nbsp;GeoJSON&nbsp;file&nbsp;into&nbsp;a&nbsp;list&nbsp;of&nbsp;(WKB,&nbsp;property&nbsp;dict)&nbsp;features.<br>
&nbsp;<br>
Result&nbsp;can&nbsp;be&nbsp;passed&nbsp;directly&nbsp;to&nbsp;mapnik.PythonDatasource.wkb_features().</tt></dd></dl>
 <dl><dt><a name="-encode"><strong>encode</strong></a>(file, features, zoom, is_clipped)</dt><dd><tt>Encode&nbsp;a&nbsp;list&nbsp;of&nbsp;(WKB,&nbsp;property&nbsp;dict)&nbsp;features&nbsp;into&nbsp;a&nbsp;GeoJSON&nbsp;stream.<br>
&nbsp;<br>
Also&nbsp;accept&nbsp;three-element&nbsp;tuples&nbsp;as&nbsp;features:&nbsp;(WKB,&nbsp;property&nbsp;dict,&nbsp;id).<br>
&nbsp;<br>
Geometries&nbsp;in&nbsp;the&nbsp;features&nbsp;list&nbsp;are&nbsp;assumed&nbsp;to&nbsp;be&nbsp;unprojected&nbsp;lon,&nbsp;lats.<br>
Floating&nbsp;point&nbsp;precision&nbsp;in&nbsp;the&nbsp;output&nbsp;is&nbsp;truncated&nbsp;to&nbsp;six&nbsp;digits.</tt></dd></dl>
 <dl><dt><a name="-get_tiles"><strong>get_tiles</strong></a>(names, config, coord)</dt><dd><tt>Retrieve&nbsp;a&nbsp;list&nbsp;of&nbsp;named&nbsp;GeoJSON&nbsp;layer&nbsp;tiles&nbsp;from&nbsp;a&nbsp;TileStache&nbsp;config.<br>
&nbsp;<br>
Check&nbsp;integrity&nbsp;and&nbsp;compatibility&nbsp;of&nbsp;each,&nbsp;looking&nbsp;at&nbsp;known&nbsp;layers,<br>
correct&nbsp;JSON&nbsp;mime-types&nbsp;and&nbsp;"FeatureCollection"&nbsp;in&nbsp;the&nbsp;type&nbsp;attributes.</tt></dd></dl>
 <dl><dt><a name="-log"><strong>log</strong></a>(...)</dt><dd><tt><a href="#-log">log</a>(x[,&nbsp;base])&nbsp;-&gt;&nbsp;the&nbsp;logarithm&nbsp;of&nbsp;x&nbsp;to&nbsp;the&nbsp;given&nbsp;base.<br>
If&nbsp;the&nbsp;base&nbsp;not&nbsp;specified,&nbsp;returns&nbsp;the&nbsp;natural&nbsp;logarithm&nbsp;(base&nbsp;e)&nbsp;of&nbsp;x.</tt></dd></dl>
 <dl><dt><a name="-mercator"><strong>mercator</strong></a>((x, y))</dt><dd><tt>Project&nbsp;an&nbsp;(x,&nbsp;y)&nbsp;tuple&nbsp;to&nbsp;spherical&nbsp;mercator.</tt></dd></dl>
 <dl><dt><a name="-merge"><strong>merge</strong></a>(file, names, config, coord)</dt><dd><tt>Retrieve&nbsp;a&nbsp;list&nbsp;of&nbsp;GeoJSON&nbsp;tile&nbsp;responses&nbsp;and&nbsp;merge&nbsp;them&nbsp;into&nbsp;one.<br>
&nbsp;<br>
<a href="#-get_tiles">get_tiles</a>()&nbsp;retrieves&nbsp;data&nbsp;and&nbsp;performs&nbsp;basic&nbsp;integrity&nbsp;checks.</tt></dd></dl>
 <dl><dt><a name="-tan"><strong>tan</strong></a>(...)</dt><dd><tt><a href="#-tan">tan</a>(x)<br>
&nbsp;<br>
Return&nbsp;the&nbsp;tangent&nbsp;of&nbsp;x&nbsp;(measured&nbsp;in&nbsp;radians).</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>charfloat_pat</strong> = &lt;_sre.SRE_Pattern object at 0x10732e3f0&gt;<br>
<strong>float_pat</strong> = &lt;_sre.SRE_Pattern object at 0x1064142d0&gt;<br>
<strong>pi</strong> = 3.1415926535897931<br>
<strong>precisions</strong> = [2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, ...]<br>
<strong>zoom</strong> = 22</td></tr></table>
</body></html>